/**
 * 课程管理API
 */
import request from '../libs/request';




/**
 * 获取分页列表
 * @returns {*}
 */
export function getPageManageList (para) {
    return request({
        url: 'api/lab/course/page',
        method: 'get',
        params: para
    });
}

/**
 * 获取列表
 * @returns {*}
 */
export function getList (para) {
    return request({
        url: 'api/lab/course/list',
        method: 'get',
        params: para
    });
}

/**
 * 获取详情
 * @returns {*}
 */
export function getInfo (para) {
    return request({
        url: 'api/lab/course/getCourseById',
        method: 'get',
        params: para
    });
}

/**
 * 获取专业列表
 * @returns {*}
 */
export function getMajorList (para) {
    return request({
        url: 'api/lab/course/getMajorList',
        method: 'get',
        params: para
    });
}

/**
 * 获取班级列表
 * @returns {*}
 */
export function getClassList (para) {
    return request({
        url: 'api/lab/course/getClassList',
        method: 'get',
        params: para
    });
}

/**
 * 获取班级学生列表
 * @returns {*}
 */
export function getClassStudentList (para) {
    return request({
        url: 'api/lab/course/getClassStudentList',
        method: 'get',
        params: para
    });
}

/**
 * 获取教师列表
 * @returns {*}
 */
export function getTeacherList (para) {
    return request({
        url: 'api/lab/course/getTeacherList',
        method: 'get',
        params: para
    });
}


/**
 * 保存
 * @returns {*}
 */
export function saveObj (para) {
    return request({
        url: 'api/lab/course/saveCourse',
        method: 'post',
        data: para
    });
}

/**
 * 启用
 * @returns {*}
 */
export function enableCourse (para) {
    return request({
        url: 'api/lab/course/enableCourse',
        method: 'post',
        data: para
    });
}

/**
 * 启用
 * @returns {*}
 */
export function disableCourse (para) {
    return request({
        url: 'api/lab/course/disableCourse',
        method: 'post',
        data: para
    });
}

/**
 * 删除
 * @returns {*}
 */
export function deleteObj (para) {
    return request({
        url: 'api/lab/course/delete',
        method: 'post',
        data: para
    });
}

/**
 * 批量排课
 * @returns {*}
 */
export function batchSaveSchedule (para) {
    return request({
        url: 'api/lab/course-scheduling/batch',
        method: 'post',
        data: para
    });
}

/**
 * 微调
 * @returns {*}
 */
export function saveSchedule (para) {
    return request({
        url: 'api/lab/course-scheduling/save',
        method: 'post',
        data: para
    });
}
/**
 * 微调时间
 * @returns {*}
 */
export function updateScheduleTime (para) {
    return request({
        url: 'api/lab/course-scheduling/updateScheduleTime',
        method: 'post',
        data: para
    });
}

/**
 * 获取排课列表
 * @returns {*}
 */
export function getScheduleList (para) {
    return request({
        url: 'api/lab/course-scheduling/list',
        method: 'post',
        data: para
    });
}

/**
 * 获取上课人数未满的课程
 * @returns {*}
 */
export function getNotFullCourseList (para) {
    return request({
        url: 'api/lab/course-scheduling/getNotFullCourseList',
        method: 'post',
        data: para
    });
}

/**
 * 删除
 * @returns {*}
 */
export function saveCourseStage (para) {
    return request({
        url: 'api/lab/course/saveStage',
        method: 'post',
        data: para
    });
}

/**
 * 删除
 * @returns {*}
 */
export function deleteCourseStage (para) {
    return request({
        url: 'api/lab/course/deleteStage',
        method: 'post',
        data: para
    });
}

/**
 * 查询课程数量
 * @returns {*}
 */
export function GetCourseSchedulingCourseCount (para) {
    return request({
        url: 'api/lab/course-scheduling/course/count',
        method: 'post',
        data: para
    });
}

/**
 * 获取课程上课班级
 * @returns {*}
 */
export function getCourseScheduleClassList (para) {
    return request({
        url: 'api/lab/course/getCourseScheduleClassList',
        method: 'get',
        params: para
    });
}

/**
 * 获取班级不排课规则
 * @returns {*}
 */
export function getClassNotScheduleRule (para) {
    return request({
        url: 'api/lab/course/getClassNotScheduleRule',
        method: 'get',
        params: para
    });
}

/**
 * 获取教师不排课规则
 * @returns {*}
 */
export function getTeacherNotScheduleRule (para) {
    return request({
        url: 'api/lab/course/getTeacherNotScheduleRule',
        method: 'get',
        params: para
    });
}

/**
 * 保存班级不排课规则
 * @returns {*}
 */
export function saveClassNotScheduleRule (para) {
    return request({
        url: 'api/lab/course/saveClassNotScheduleRule',
        method: 'post',
        data: para
    });
}

/**
 * 保存课程上课班级
 * @returns {*}
 */
export function saveCourseScheduleClass (para) {
    return request({
        url: 'api/lab/course/saveCourseScheduleClass',
        method: 'post',
        data: para
    });
}

/**
 * 保存教师不排课规则
 * @returns {*}
 */
export function saveTeacherNotScheduleRule (para) {
    return request({
        url: 'api/lab/course/saveTeacherNotScheduleRule',
        method: 'post',
        data: para
    });
}

/**
 * 保存资料
 * @returns {*}
 */
export function getCourseTextBookList (para) {
    return request({
        url: 'api/lab/course/textbook/list',
        method: 'get',
        params: para
    });
}

/**
 * 保存资料
 * @returns {*}
 */
export function saveCourseTextBook (para) {
    return request({
        url: 'api/lab/course/textbook/save',
        method: 'get',
        params: para
    });
}

/**
 * 删除教材
 * @returns {*}
 */
export function deleteCourseTextBook (para) {
    return request({
        url: 'api/lab/course/textbook/delete',
        method: 'post',
        data: para
    });
}
